import { createElement, createTextNode, mount, patch } from './vdom';
const oldVnode = createElement('ul', {},
    createElement('li', {  }, createTextNode('A1')),
    createElement('li', {  }, createTextNode('B1')),
    createElement('li', {  }, createTextNode('C1')),
    createElement('li', {  }, createTextNode('D1'))
);
const app = document.querySelector('#app');
mount(app, oldVnode);
document.querySelector('#key')
    .addEventListener('click', () => {
        const newVnode = createElement('ul', {},
        createElement('li', {  }, createTextNode('A2')),
        createElement('li', {  }, createTextNode('B2')),
        createElement('li', {  }, createTextNode('C2')),
        createElement('li', {  }, createTextNode('D2'))
        );
        patch(oldVnode, newVnode);
    });